package com.liangsong.designpattern.composite;

import java.util.ArrayList;
import java.util.List;

public class Team extends EmpComponent{
    private List<Emp> team = new ArrayList<>();

    public Team(List<Emp> team){
        this.team = team;
    }

    @Override
    public void showAllName() {
        for (Emp e:team
             ) {
            e.showAllName();
        }
    }
}
